package com.sakura.oj.model.dto.problem;

import com.sakura.oj.model.dto.judge.JudgeCaseAddRequest;
import com.sakura.oj.model.entity.JudgeConfig;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * 创建题目请求
 *
 * @author sakura
 */
@Data
public class ProblemAddRequest implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标题
     */
    @NotBlank(message = "题目标题不能为空")
    @Size(min = 6, max = 36, message = "题目标题长度在6到36位之间")
    private String title;

    /**
     * 内容
     */
    @NotBlank(message = "题目内容不能为空")
    private String content;

    /**
     * 判题用例列表
     */
    private List<JudgeCaseAddRequest> judgeCaseList;

    /**
     * 难度；EASY简单，MEDIUM中等，HARD困难
     */
    private String difficulty;

    /**
     * 判题配置（json 对象）
     */
    @NotBlank(message = "判题配置不能为空")
    private JudgeConfig judgeConfig;

    /**
     * 标签列表 (传递标签的id)
     */
    private List<Long> tags;
}